import fetch from '@/common/utils/http'

/* 获取字段列表 */
export const getFields = (data: any) =>
  fetch({
    url: '/platform/action/console/global-field/query',
    method: 'POST',
    data
  })

/* 新建字段列表 */
export const addField = (data: any) =>
  fetch({
    url: '/platform/action/console/global-field/create',
    method: 'POST',
    data
  })

/* 更新字段列表 */
export const updateField = (data: any) =>
  fetch({
    url: '/platform/action/console/global-field/update',
    method: 'POST',
    data
  })

/* 停用、启用字段 */
export const fieldStatus = (data: any) =>
  fetch({
    url: '/platform/action/console/global-field/status',
    method: 'POST',
    data
  })

/* 删除字段 */
export const delField = (data: any) =>
  fetch({
    url: '/platform/action/console/global-field/delete',
    method: 'POST',
    data
  })
